<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<title>管理员登录</title>
		<%@include file="/common/header.jsp" %>
		<link rel="stylesheet" href="${basePath }css/admin/css/adminlogin.css" />
		
	</head>
	<body>
		<div class="_loginFrame">
			<form action="admin_login.action" method="POST">
				<div class="_login">
					<div class="_login_title">
						<h2>管理员登录</h2>
					</div>
					<div class="_login_text">
						<div class="_login_account_img_acc"></div>
						<div class="_login_account">
							<s:textfield id="account" name="admin.account"></s:textfield>
						</div>
					</div>
					<div class="_login_text">
						<div class="_login_account_img_pwd"></div>
						<div class="_login_account">
							<s:password id="password" name="admin.password"></s:password>
						</div>
					</div>
					<div class="_login_btn">
						<input class="_login_btn_sub" type="submit" value="登录"/>
					</div>
					<a href="${basePath }home_toHomePageUI.action"  class="_login_a">回到首页</a>
					<div class="_login_tip">${requestScope.message }</div>
				</div>
			</form>
		</div>
		
		
		<script type="text/javascript">
			function doSubmit(){
				//先进行表单校验
				var accinfo = $('#account').val();		
				if(accinfo.length < 4 || accinfo.length > 16){
					alert('帐号不能为空,并且长度为4-16个字符');
					$('#account').focus();	
					return false;
				}
				var pwdinfo = $('#password').val();		
				if(pwdinfo.length < 4 || pwdinfo.length > 16){
					alert('密码不能为空,并且长度为4-16个字符');
					$('#password').focus();	
					return false;
				}

				//提交表单
				document.forms[0].submit();
			}
		</script>
	</body>
</html>
